const getters = {
  // 全局计算属性，调用时候不需要带模块名
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 外面之间直接获取getters.token来获取token
  token: state => state.user.token,
  avatar: state => state.user.userInfo.staffPhoto,
  name: state => state.user.userInfo.username,
  userId: state => state.user.userInfo.userId, // 直接把id放入此处，方便其他模块使用
  routes: state => state.user.routes, // 直接把id放入此处，方便其他模块使用
  company: state => state.user.userInfo.company, // 公司名称
  departmentName: state => state.user.userInfo.departmentName // 部门名称
}
export default getters
